/**
 * @Author:Geln Yang
 * @Created:2008-9-15 $ Revision: 1.0 $ $ Author: Geln Yang $ $ Date: 2008-9-15 $
 */
package com.hgy.commonsale.webui.action;

import org.geln.web.page.Page;
import org.geln.web.util.URLUtils;
import org.geln.web.webwork.action.Basal;

import com.hgy.commonsale.webui.context.IApplicationSessionContext;
import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionSupport;

/**
 * @Author:Geln Yang
 * @Created:2008-9-15
 */
public class BasalAction extends ActionSupport implements Basal {
	protected IApplicationSessionContext sessionContext;
	protected Page page;

	public final Page getPage() {
		if (page == null)
			page = new Page();
		return page;
	}

	public final void setPage(Page page) {
		this.page = page;
	}

	public String getOriginalURL() {
		return URLUtils.buildOriginalURL(ServletActionContext.getRequest());
	}

	public String getClientIPAddress() {
		return ServletActionContext.getRequest().getRemoteAddr();
	}

	public void setSessionContext(IApplicationSessionContext sessionContext) {
		this.sessionContext = sessionContext;
	}
}
